#ifndef __PWM_H__
#define __PWM_H__

#include "soc_comm.h"

typedef struct PwmDev_s
{
    uint8_t duty;
    SOC_GpioPort_t port;
    int pin;

    //private
    uint8_t count;
    bool isRunning;
}PwmDev_t;

void PWM_Init(PwmDev_t *pwm, SOC_GpioPort_t port, int pin);
void PWM_SetDuty(PwmDev_t *pwm, uint8_t duty);
void PWM_Start(PwmDev_t *pwm);
void PWM_Stop(PwmDev_t *pwm);

#endif 